<?php

class PlannerCategory extends AdminBase
{
    function __construct(){
        parent::__construct();
        $this->do = 'plannerCategory';
        $this->{$this->op}();
    }

    function indexAction()
    {
        echo render('plannerCategory');
        exit();
    }

    function listAction()
    {
        $this->fetchData($this->getParam('getPlannerCategories'));
    }

    function editAction()
    {
        $this->fetchData($this->getParam('managePlannerCategories'));
    }

    function addAction()
    {
        $this->fetchData($this->getParam('createPlannerCategory'));
    }

    function detailAction()
    {
        $this->fetchData($this->getParam('getPlannerCategoryDetail'));
    }

    private function getParam($action)
    {
        return array_merge(['do'=>$this->do,'format'=>'json','action'=>$action],$this->req);
    }
}
new PlannerCategory;

